<script setup lang='ts'>
import { toRefs } from 'vue'

const props = defineProps<{
    data: any
}>()

const emits = defineEmits(['close'])

const { data } = toRefs(props)

function close(item: any) {
    emits('close', item)
}
</script>

<template>
    <div class="flex">
        <div v-for="(item, index) in data"
             :key="item.index"
             class="text-14 c-#767676 flex items-center"
        >
            <span v-if="index === 0">全部结果</span>

            <el-tag v-else
                    closable
                    type="success"
                    @close="close(item)"
            >
                {{ item.label }}
            </el-tag>

            <el-icon v-show="index !== data.length - 1"
                     size="20"
                     class="ml-6 mr-6"
                     color="#C9CDD4"
            >
                <ArrowRight />
            </el-icon>
        </div>
    </div>
</template>

<style lang="less" scoped>

</style>
